<template>
    <section class="modlude">
        <el-form :inline="true" :model="formSearch" class="form_inline" label-width="100px">
            <el-form-item label="设备名称" size="small">
                <el-input v-model="formSearch.devName" placeholder="请选择设备名" clearable></el-input>
            </el-form-item>
            <el-form-item label="开门结果" size="small">
                <el-select v-model="formSearch.operResult" clearable>
                    <el-option label="成功" :value="1"></el-option>
                    <el-option label="失败" :value="0"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="进入时间" size="small">
                <el-date-picker v-model="formSearch.startTime" type="datetime" clearable value-format="yyyy-MM-dd HH:mm:ss"
                    placeholder="进入时间">
                </el-date-picker>
            </el-form-item>
            <el-form-item label="离开时间" size="small">
                <el-date-picker v-model="formSearch.endTime" type="datetime" clearable value-format="yyyy-MM-dd HH:mm:ss"
                    placeholder="离开时间">
                </el-date-picker>
            </el-form-item>
            <el-form-item>
                <el-button size="small" @click="sendData">查 询</el-button>
            </el-form-item>
        </el-form>
    </section>
</template>

<script>
import {
    getAnJuBaoInsertDoorLog,
} from '../../../url/api';
export default {
    data() {
        return {
            checkStrictly: false,
            moduleInfor: {},
            bindRole: {},
            showmenuList: [],
            menuList: [],
            option1: [],
            xqTree: [],
            isAddorUpdate: 1, //1添加、2修改
            formSearch: {
                current: 1,
                size: 10,
                startTime:"",
                endTime:"",
                operResult:"",
                devName:"",
            },
            formData: [], //数据
            deleBatch: [], //删除数据
            formUpdate: {}, //修改表单
            total: 0, //数据总数
            pages: 0, //页面总数
            addDialog: false,
            updateDialog: false,
            dialog: false,
            replyType: 1, //1。单个回复 2.批量回复
            formPush: {},
            rules: {
                name: [{ required: true, message: '该项不能为空' }],
                type: [
                    {
                        required: true,
                        message: '该项不能为空',
                        trigger: 'blur',
                    },
                ],
                projectId: [
                    {
                        required: true,
                        message: '该项不能为空',
                        trigger: 'blur',
                    },
                ],
            },
            imageUrl: '',
        };
    },
    methods: {
        sendData(){
        console.log('emit加载')
        this.formSearch.current = 1
        this.Bus.$emit('sendTableDatapk_cis',{
          formSearch:this.formSearch,
          // total:this.total
      })
      },
      getList(){
            let params = {
                  current:this.formSearch.current,
                  size:this.formSearch.size,
                  startTime:this.formSearch.startTime,
                  endTime:this.formSearch.endTime,
                //   msg:this.formSearch.msg,
                //   devName:this.formSearch.devName,
                //   nickname:this.formSearch.nickname
            }
            getAnJuBaoInsertDoorLog(params).then((res) => {
                        if (res.data.ok) {
                            this.formData = res.data.data.records
                            this.total = res.data.data.total
                        }
                    });
        },
    },
};
</script>
<style scoped lang='scss'>
.form_inline /deep/ .el-form-item {
    margin: 10px 4px;
}
.form_inline /deep/ .el-date-editor.el-input,
.el-date-editor.el-input__inner {
    width: 156px;
}
/* .cont_box {
    width: 100%;
    display: flex;
}
.cont_box_left,
.cont_box_right {
    flex: 1;
    background: transparent;
    padding: 10px;
}
.cont_box_left {
    margin-right: 10px;
}
.margin10 {
    margin-bottom: 10px;
}
.marginRight {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.cont_box_right .el-form-item {
    margin-bottom: 20px;
} */
</style>
